package KharkovITCourses.proc.loop.array_inverter_optimized;

/**
 * Created with IntelliJ IDEA.
 * User: ZefiR
 * Date: 18.01.13
 * Time: 23:04
 * To change this template use File | Settings | File Templates.
 */
    public class ArrayInverter
    {
        public static void invert(int[] arr) {
            for (int k = arr.length / 2 - 1; k >= 0 ; k--) {
                int tmp = arr[k];
                arr[k] = arr[arr.length - k - 1];
                arr[arr.length - k - 1] = tmp;
            }
        }
    }
